package com.yuanguangsheng.disk.user.service;

import com.yuanguangsheng.disk.mybatis.entity.PtUserEntity;
import com.yuanguangsheng.disk.mybatis.flexigrid.PagingEntity;
import com.yuanguangsheng.disk.mybatis.flexigrid.TblResponseEntity;
import com.yuanguangsheng.disk.mybatis.ztree.ZtreeEntity;
import com.yuanguangsheng.disk.user.entity.SearchUserEntity;
import com.yuanguangsheng.disk.user.exeption.*;

import java.util.List;

public interface UserService {
    /**
     * 查询用户列表
     * @return
     */
    List<PtUserEntity> queryUserList();

    /**
     * 删除用户
     * @param ids 用户编码数组
     */
    void deleteUserByIds(String ids) throws UserOccupyException;

    /**
     * 分页查询用户信息
     * @param entity
     * @param paging
     * @return
     */
    TblResponseEntity<PtUserEntity> queryUserInfoListByPage(SearchUserEntity entity, PagingEntity paging);

    /**
     * 查询用户信息
     * @param userUuid
     * @return
     */
    PtUserEntity queryUserInfoById(String userUuid);

    /**
     * 修改用户信息
     * @param entity
     */
    void modifyUserInfoById(PtUserEntity entity) throws UserNameRepeatException.EmailRepeatException, MobileRepeatException, UserNameRepeatException;

    /**
     * 增加用户信息
     * @param entity
     */
    void addUserInfo(PtUserEntity entity) throws UserNameRepeatException.EmailRepeatException, MobileRepeatException, UserNameRepeatException;;

    /**
     * 根据用户查询角色列表
     * @param userUuid
     * @return
     */
    List<ZtreeEntity> queryRoleTreeListByUser(String userUuid);

    /**
     * 保存角色和用户关系
     * @param userUuidArray
     * @param roleUuidArray
     */
    void SaveRoleRefUser(String userUuidArray, String roleUuidArray);

    // 新增密码重置方法
    void resetPassword(String userUUIDs) throws UserNotFoundException;

    // 其他原有方法...
}
